<%@ include file="/WEB-INF/jsp/taglib.jsp" %>

<jsp:useBean id="actionBean" scope="request" type="com.rupertjones.globalcron.web.InfoHostAction" />

<s:layout-render name="/WEB-INF/jsp/layout.jsp" title="Global Cron" subtitle="Hosts">
        <s:layout-component name="body">
        <h1>Jobs on Host: ${actionBean.host.name} (${actionBean.host.hostname})</h1>
        <div style="text-align: right; border:1px; width:100%; padding-bottom:10px;"><a href="EditHost.action?host.id=${actionBean.host.id}"><img src="resources/edit.gif" border="0"/></a></div>
            <display:table name="actionBean.enabledJobs" id="job" requestURI="Home.action" class="rounded-corner">
            <display:column title="Name" property="name"/>
            <display:column title="Timezone" property="timezone"/>
            <display:column title="Cron" property="cron"/>
            <display:column title="Scheduled" property="scheduled"/>
            <display:column title="Script" property="script"/>
            <display:column title="Next Fire (@Server Time)" property="nextFireTimeFormatted"/>
            <display:column title="Last Fire (@Server Time)" property="lastFireTimeFormatted"/>
            <display:column title="">
            <a title="Information on this job" href="InfoJob.action?job.id=${job.id}"><img align="right" src="resources/info.png" border="0"></a>
            <a title="Edit Job" href="EditJob.action?job.id=${job.id}"><img style="padding-right:10px;" align="right" src="resources/edit.gif" border="0"></a>
            </display:column>
        </display:table>

        <h2>Disabled Jobs</h2>
        <display:table name="actionBean.disabledJobs" id="job" requestURI="Home.action" class="rounded-corner">
        <display:column title="Name" property="name"/>
        <display:column title="Timezone" property="timezone"/>
        <display:column title="Cron" property="cron"/>
        <display:column title="Script" property="script"/>
        <display:column title="Last Fire (@Server Time)" property="lastFireTimeFormatted"/>
        <display:column title="">
        <a title="Information on this job" href="InfoJob.action?job.id=${job.id}"><img align="right" src="resources/info.png" border="0"></a>
        <a title="Edit Job" href="EditJob.action?job.id=${job.id}"><img style="padding-right:10px;" align="right" src="resources/edit.gif" border="0"></a>
        </display:column>
        </display:table>

    </s:layout-component>
</s:layout-render>
